package com.lyf.design.practice.theory.behavior.chain;

/**
 * @author LYF
 * @date 2022/6/22
 */
abstract public class Handler {
       protected String name;
       protected Handler nextHandler;

    public Handler() {
    }

    public Handler(String name, Handler nextHandler) {
        this.name = name;
        this.nextHandler = nextHandler;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setNextHandler(Handler nextHandler) {
        this.nextHandler = nextHandler;
    }

    abstract void handle(Integer money);
}
